<!--
*Author：DGZ
 *Contact：jiduxiong@dagongzao.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/apsproject/schedule/Aps_ScheduleTask.jsx此处编写
 -->
<template>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :details="details"
               :editFormFields="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    </view-grid>
</template>
<script>
    import extend from "@/extension/apsproject/schedule/Aps_ScheduleTask.jsx";
    import { ref, defineComponent } from "vue";
    export default defineComponent({
        name: "Aps_ScheduleTask",
        setup() {
            const table = ref({
                key: "ScheduleTaskId",
                footer: "Foots",
                cnName: "排程主表",
                name: "schedule/Aps_ScheduleTask",
                newTabEdit: false,
                url: "/Aps_ScheduleTask/",
                sortName: "ScheduleTaskId"
            });
            const editFormFields = ref({"ScheduleVersionId":"","MachineId":"","GroupId":"","MoCode":"","ProductsCode":"","UPH":"","OutputCircle":"","\r\nPreparationMinutes":"","BeforeMinutes":"","afterMinutes":"","Qty":"","Weight":"","DeadLine":"","Seq":"","IsNew":"","IsFinish":"","FinishStatus":"","FinishedQty":"","FinishedWeight":"","Remarks":""});
            const editFormOptions = ref([[{"title":"排程版本ID","required":true,"field":"ScheduleVersionId","type":"number"},
                               {"title":"设备ID","field":"MachineId","type":"number"}],
                              [{"title":"工序ID","field":"GroupId","type":"number"},
                               {"title":"生产任务单号","field":"MoCode"}],
                              [{"title":"产品","field":"ProductsCode"},
                               {"title":"小时产能","field":"UPH","type":"decimal"}],
                              [{"title":"产出节拍","field":"OutputCircle","type":"decimal"},
                               {"title":"准备时长分钟","field":"\r\nPreparationMinutes","type":"decimal"}],
                              [{"title":"前置时长分钟","field":"BeforeMinutes","type":"decimal"},
                               {"title":"后置时长分钟","field":"afterMinutes","type":"decimal"}],
                              [{"title":"产品数量","field":"Qty","type":"decimal"},
                               {"title":"产品重量","field":"Weight","type":"decimal"}],
                              [{"title":"出货日","field":"DeadLine"},
                               {"title":"顺序","field":"Seq","type":"number"}],
                              [{"title":"新版本中新增标识","field":"IsNew","type":"number"},
                               {"title":"标识能否排完","field":"IsFinish","type":"number"}],
                              [{"title":"0可按时达成 1可提前达成 2无法按时达成","field":"FinishStatus","type":"number"},
                               {"title":"完成的数量","field":"FinishedQty","type":"decimal"}],
                              [{"title":"完成的重量","field":"FinishedWeight","type":"decimal"}],
                              [{"title":"备注","field":"Remarks","colSize":12,"type":"textarea"}]]);
            const searchFormFields = ref({});
            const searchFormOptions = ref([]);
            const columns = ref([{field:"ScheduleVersionId",title:"排程版本ID",type:"bigint",width:110,require:true,showOverflowTooltip:true,align:"left"},
                       {field:"ScheduleTaskId",title:"ID",type:"bigint",width:110,hidden:true,readonly:true,require:true,showOverflowTooltip:true,align:"left"},
                       {field:"MachineId",title:"设备ID",type:"bigint",width:110,showOverflowTooltip:true,align:"left"},
                       {field:"GroupId",title:"工序ID",type:"bigint",width:110,showOverflowTooltip:true,align:"left"},
                       {field:"MoCode",title:"生产任务单号",type:"string",width:120,showOverflowTooltip:true,align:"left"},
                       {field:"ProductsCode",title:"产品",type:"string",width:180,showOverflowTooltip:true,align:"left"},
                       {field:"UPH",title:"小时产能",type:"decimal",width:110,showOverflowTooltip:true,align:"left"},
                       {field:"OutputCircle",title:"产出节拍",type:"decimal",width:110,showOverflowTooltip:true,align:"left"},
                       {field:"PreparationMinutes",title:"准备时长分钟",type:"decimal",width:110,showOverflowTooltip:true,align:"left"},
                       {field:"BeforeMinutes",title:"前置时长分钟",type:"decimal",width:110,showOverflowTooltip:true,align:"left"},
                       {field:"afterMinutes",title:"后置时长分钟",type:"decimal",width:110,showOverflowTooltip:true,align:"left"},
                       {field:"Qty",title:"产品数量",type:"decimal",width:110,showOverflowTooltip:true,align:"left"},
                       {field:"Weight",title:"产品重量",type:"decimal",width:110,showOverflowTooltip:true,align:"left"},
                       {field:"DeadLine",title:"出货日",type:"datetime",width:110,showOverflowTooltip:true,align:"left"},
                       {field:"Seq",title:"顺序",type:"int",width:110,showOverflowTooltip:true,align:"left"},
                       {field:"IsNew",title:"新版本中新增标识",type:"int",width:110,showOverflowTooltip:true,align:"left"},
                       {field:"IsFinish",title:"标识能否排完",type:"int",width:110,showOverflowTooltip:true,align:"left"},
                       {field:"FinishStatus",title:"0可按时达成 1可提前达成 2无法按时达成",type:"int",width:110,showOverflowTooltip:true,align:"left"},
                       {field:"FinishedQty",title:"完成的数量",type:"decimal",width:110,showOverflowTooltip:true,align:"left"},
                       {field:"FinishedWeight",title:"完成的重量",type:"decimal",width:110,showOverflowTooltip:true,align:"left"},
                       {field:"IsValid",title:"是否有效",type:"int",width:110,hidden:true,showOverflowTooltip:true,align:"left"},
                       {field:"CreateId",title:"创建用户",type:"bigint",width:80,hidden:true,showOverflowTooltip:true,align:"left"},
                       {field:"Creator",title:"创建人",type:"string",width:100,showOverflowTooltip:true,align:"left"},
                       {field:"CreateTime",title:"创建时间",type:"datetime",width:110,showOverflowTooltip:true,align:"left"},
                       {field:"ModifyId",title:"修改用户",type:"bigint",width:80,hidden:true,showOverflowTooltip:true,align:"left"},
                       {field:"Modifier",title:"修改人",type:"string",width:100,showOverflowTooltip:true,align:"left"},
                       {field:"ModifyTime",title:"修改时间",type:"datetime",width:110,showOverflowTooltip:true,align:"left"},
                       {field:"Remarks",title:"备注",type:"string",width:150,showOverflowTooltip:true,align:"left"}]);
            const detail = ref({columns:[]});
            const details = ref([]);
            return {
                table,
                extend,
                editFormFields,
                editFormOptions,
                searchFormFields,
                searchFormOptions,
                columns,
                detail,
                details
            };
        },
    });
</script>
